package com.cloud.cop.validation;

import java.util.ArrayList;
import java.util.List;
/**
 *	系统错误实现类
 * @author mayh
 *
 */

public class DefaultMainError implements MainError {

	private String code;
	
	private String message;
	
	private String solution;
	
	private List<SubError> subErrors = new ArrayList<SubError>();
	
	
	public DefaultMainError(String code,String message,String solution){
		this.code = code;
		this.message = message;
		this.solution = solution;
	}
	
	public void setCode(String code) {
		this.code = code;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public void setSolution(String solution) {
		this.solution = solution;
	}

	public void setSubErrors(List<SubError> subErrors) {
		this.subErrors = subErrors;
	}

	public MainError addSubError(SubError subError) {
		this.subErrors.add(subError);
		return this;
	}

	public String getCode() {
		
		return this.code;
	}

	public String getMessage() {
		
		return this.message;
	}

	public List<SubError> getSubErrors() {
		
		return this.subErrors;
	}

	public String getSolution() {
		
		return this.solution;
	}

	

}
